<script>jQuery(function(){
    var panel = $("#comments_answer_list");
    panel.find(".ajax_modal").ajax_modal({ callback: function(modal){ modal.find("form").validate();  } });
    $("#sidebar-menu li[data-key='comments']").addClass("active"); //fix menu
})</script>
<div class="panel panel-default" id="comments_answer_list">
    <div class="panel-heading">
        <div class="row">
            <div class="col-md-12">
                <h4 class="pull-left"><span class="fa fa-comments"></span> <%= t('camaleon_cms.admin.post_type.comments') %></h4>
                <%= link_to raw("<i class='fa fa-plus'></i> #{t('camaleon_cms.admin.button.new')}"), {action: :new}, class: "btn btn-primary pull-right ajax_modal", title: t("camaleon_cms.admin.comments.new_msg") %>
            </div>
        </div>
    </div>
    <div class="panel-body">
        <div class="messages messages-img">
            <%= raw "<div class='alert alert-warning'>#{t('camaleon_cms.admin.comments.message.there_no_comments')}</div>" if @comments.size == 0 %>
            <%= raw cama_comments_render_html(@comments) %>
        </div>
    </div>
</div>